home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / jots.zip / MENU.BAS < prev    next >
BASIC Source File  |  1989-03-14  |  1KB  |  50 lines

  1. ' MENU.BAS -- This module handles the main menu
  2. ' $INCLUDE: 'J.INC'
  3.  
  4. DECLARE SUB Pstring (Msg$, Row)
  5. DIM SHARED MyBox AS BoxType, TopRow, BotRow, LftCol, RtCol
  6.  
  7. SUB MainMenu
  8.     CALL BoxCoords(MainMenuBox, MyBox)
  9.     TopRow = MyBox.TopRow
  10.     BotRow = MyBox.BotRow
  11.     LftCol = MyBox.LftCol
  12.     RtCol = MyBox.RtCol
  13.  
  14.     DO
  15.         COLOR Normal, Background, Background
  16.         CLS
  17.         NormalBox (MainMenuBox)
  18.         
  19.         CALL Pstring("The Game of Jots", 1)
  20.         CALL Pstring("Copyright 1989 PC Resource", 2)
  21.         CALL Pstring("1. Play the Game", 5)
  22.         CALL Pstring("2. Instructions", 7)
  23.         CALL Pstring("3. Maintain Word List", 9)
  24.         CALL Pstring("4. Quit", 11)
  25.         CALL Pstring("   Press number of your choice", 14)
  26.         DO
  27.             choice$ = INPUT$(1)
  28.         LOOP UNTIL choice$ >= "1" AND choice$ <= "4"
  29.         SELECT CASE choice$
  30.             CASE "1"
  31.                 DO
  32.                     PlayAGame
  33.                 LOOP UNTIL PlayAgain = FALSE
  34.             CASE "2"
  35.                 Instructions
  36.             CASE "3"
  37.                 WordMaintenance
  38.             CASE "4"
  39.                 EXIT SUB
  40.             CASE ELSE
  41.         END SELECT
  42.     LOOP
  43. END SUB
  44.  
  45. SUB Pstring (Msg$, Row)
  46.     LOCATE TopRow + Row, LftCol + (RtCol - LftCol - LEN(Msg$)) / 2, 0
  47.     PRINT Msg$;
  48. END SUB
  49.  
  50.